import {
  SystemZeroCodeSaveJson,
  SystemZeroCodePublicJson,
  SystemZeroCodeFindById,
  SystemReportUnitQuery,
  SystemReportUnitTypeQuery,
} from "@/services/api";
import { request, METHOD } from "@/utils/request";
/**
 * 列表
 */
export function queryUnitType(param) {
  return request(SystemReportUnitTypeQuery, METHOD.POST, param);
}

/**
 * 列表
 */
export function queryUnit(param) {
  return request(SystemReportUnitQuery, METHOD.POST, param);
}
/**
 * 保存
 */
export async function editSave(form) {
  return request(SystemZeroCodeSaveJson, METHOD.POST, form);
}
/**
 * 发布
 */
export async function editPublic(form) {
  return request(SystemZeroCodePublicJson, METHOD.POST, form);
}

/**
 * 根据Id获取
 */
export async function findById(id) {
  return request(SystemZeroCodeFindById + "/" + id, METHOD.GET, {});
}
export default {
  queryUnitType,
  queryUnit,
  editSave,
  editPublic,
  findById,
};
